#include <iostream>
using namespace std;

int main() {
    float a;
    char b;
    float total=0.0;
    while (cin >> a >> b)
    {
        if (a <= 1)
        {
            total = 20;
        }
        else
        {
            int tmp = a / 1;
            if (a - tmp > 0)
            {
                total = (a - tmp) * 2;
            }
            total += tmp * 20;
        }
        if (b == 'y')
        {
            total += 5;
        }
    }
    cout << total << endl;
    return 0;
}